/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.cinfo.siga.gestionacademica.ui.visual;

import org.netbeans.api.settings.ConvertAsProperties;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
import org.openide.windows.TopComponent;
import org.openide.util.NbBundle.Messages;

/**
 * Top component which displays something.
 */
@ConvertAsProperties(
        dtd = "-//org.cinfo.siga.gestionacademica.ui.visual//ConsultarGruposxModulo//EN",
        autostore = false)
@TopComponent.Description(
        preferredID = "ConsultarGruposxModuloTopComponent",
        //iconBase="SET/PATH/TO/ICON/HERE", 
        persistenceType = TopComponent.PERSISTENCE_ALWAYS)
@TopComponent.Registration(mode = "editor", openAtStartup = false)
@ActionID(category = "Window", id = "org.cinfo.siga.gestionacademica.ui.visual.ConsultarGruposxModuloTopComponent")
@ActionReference(path = "Menu/Window" /*, position = 333 */)
@TopComponent.OpenActionRegistration(
        displayName = "#CTL_ConsultarGruposxModuloAction",
        preferredID = "ConsultarGruposxModuloTopComponent")
@Messages({
    "CTL_ConsultarGruposxModuloAction=ConsultarGruposxModulo",
    "CTL_ConsultarGruposxModuloTopComponent=Módulo Grupo",
    "HINT_ConsultarGruposxModuloTopComponent=This is a ConsultarGruposxModulo window"
})
public final class AdministrarGruposTopComponent extends TopComponent {

    public AdministrarGruposTopComponent() {
        initComponents();
        setName(Bundle.CTL_ConsultarGruposxModuloTopComponent());
        setToolTipText(Bundle.HINT_ConsultarGruposxModuloTopComponent());

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        comboModulo = new javax.swing.JComboBox();
        txtBuscar = new javax.swing.JTextField();
        botonNuevo = new javax.swing.JButton();
        botonModificar = new javax.swing.JButton();
        botonCalendario = new javax.swing.JButton();
        primero = new javax.swing.JButton();
        ultimo = new javax.swing.JButton();
        adelante = new javax.swing.JButton();
        atras = new javax.swing.JButton();
        actualizar = new javax.swing.JButton();
        scrollPanel = new javax.swing.JScrollPane();
        tabla = new javax.swing.JTable();

        org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.jLabel1.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.jLabel2.text")); // NOI18N

        comboModulo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        txtBuscar.setText(org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.txtBuscar.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(botonNuevo, org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.botonNuevo.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(botonModificar, org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.botonModificar.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(botonCalendario, org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.botonCalendario.text")); // NOI18N

        primero.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/cinfo/siga/gestionacademica/ui/visual/iconos/control-stop-180.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(primero, org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.primero.text")); // NOI18N
        primero.setToolTipText(org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.primero.toolTipText")); // NOI18N

        ultimo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/cinfo/siga/gestionacademica/ui/visual/iconos/control-stop.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(ultimo, org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.ultimo.text")); // NOI18N

        adelante.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/cinfo/siga/gestionacademica/ui/visual/iconos/control.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(adelante, org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.adelante.text")); // NOI18N

        atras.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/cinfo/siga/gestionacademica/ui/visual/iconos/control-180.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(atras, org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.atras.text")); // NOI18N

        actualizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/cinfo/siga/gestionacademica/ui/visual/iconos/arrow-circle-315.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(actualizar, org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.actualizar.text")); // NOI18N

        tabla.setAutoCreateRowSorter(true);
        tabla.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null}
            },
            new String [] {
                "CODIGO", "DOCENTE", "INSCRITOS", "VACANTES", "AULA", "INICIO", "HORARIO"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tabla.setCellSelectionEnabled(true);
        tabla.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        tabla.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        tabla.getTableHeader().setResizingAllowed(false);
        tabla.getTableHeader().setReorderingAllowed(false);
        scrollPanel.setViewportView(tabla);
        tabla.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION);
        tabla.getColumnModel().getColumn(0).setResizable(false);
        tabla.getColumnModel().getColumn(0).setHeaderValue(org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.tabla.columnModel.title0")); // NOI18N
        tabla.getColumnModel().getColumn(1).setResizable(false);
        tabla.getColumnModel().getColumn(1).setHeaderValue(org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.tabla.columnModel.title1")); // NOI18N
        tabla.getColumnModel().getColumn(2).setResizable(false);
        tabla.getColumnModel().getColumn(2).setHeaderValue(org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.tabla.columnModel.title2")); // NOI18N
        tabla.getColumnModel().getColumn(3).setResizable(false);
        tabla.getColumnModel().getColumn(3).setHeaderValue(org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.tabla.columnModel.title3_1")); // NOI18N
        tabla.getColumnModel().getColumn(4).setResizable(false);
        tabla.getColumnModel().getColumn(4).setHeaderValue(org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.tabla.columnModel.title4")); // NOI18N
        tabla.getColumnModel().getColumn(5).setResizable(false);
        tabla.getColumnModel().getColumn(5).setHeaderValue(org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.tabla.columnModel.title5")); // NOI18N
        tabla.getColumnModel().getColumn(6).setResizable(false);
        tabla.getColumnModel().getColumn(6).setHeaderValue(org.openide.util.NbBundle.getMessage(AdministrarGruposTopComponent.class, "AdministrarGruposTopComponent.tabla.columnModel.title6")); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addGap(28, 28, 28)
                        .addComponent(comboModulo, 0, 279, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addGap(30, 30, 30)
                        .addComponent(txtBuscar)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(21, 21, 21)
                        .addComponent(botonNuevo, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(botonModificar, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(botonCalendario)
                        .addGap(93, 93, 93))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(primero, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(atras, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(adelante, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(ultimo, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(actualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(21, 21, 21))))
            .addComponent(scrollPanel)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(33, 33, 33)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(botonCalendario)
                            .addComponent(botonModificar)
                            .addComponent(botonNuevo)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(comboModulo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel2)
                        .addComponent(txtBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(primero, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(actualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(ultimo, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(adelante, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(atras, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addComponent(scrollPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 344, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton actualizar;
    private javax.swing.JButton adelante;
    private javax.swing.JButton atras;
    private javax.swing.JButton botonCalendario;
    private javax.swing.JButton botonModificar;
    private javax.swing.JButton botonNuevo;
    private javax.swing.JComboBox comboModulo;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JButton primero;
    private javax.swing.JScrollPane scrollPanel;
    private javax.swing.JTable tabla;
    private javax.swing.JTextField txtBuscar;
    private javax.swing.JButton ultimo;
    // End of variables declaration//GEN-END:variables
    @Override
    public void componentOpened() {
        // TODO add custom code on component opening
    }

    @Override
    public void componentClosed() {
        // TODO add custom code on component closing
    }

    void writeProperties(java.util.Properties p) {
        // better to version settings since initial version as advocated at
        // http://wiki.apidesign.org/wiki/PropertyFiles
        p.setProperty("version", "1.0");
        // TODO store your settings
    }

    void readProperties(java.util.Properties p) {
        String version = p.getProperty("version");
        // TODO read your settings according to their version
    }
}
